Added a fallback image property to ImageBrushLoader#41
Merged
SKProCH merged 3 commits intoAvaloniaUtils:masterfrom Mar 2, 2026
Merged
Added a fallback image property to ImageBrushLoader#41SKProCH merged 3 commits intoAvaloniaUtils:masterfrom
SKProCH merged 3 commits intoAvaloniaUtils:masterfrom
Conversation
SKProCH
requested changes
Mar 1, 2026
| @@ -27,6 +27,14 @@ private static async void OnSourceChanged(ImageBrush imageBrush, AvaloniaPropert | |||
| try { | |||
| if (!string.IsNullOrWhiteSpace(newValue)) { | |||
Member
There was a problem hiding this comment.
Probably we need to check on null there, since it checked to null in AdvancedImage, lets standardize that
Contributor
Author
There was a problem hiding this comment.
Isn't that on line 31/32? AdvancedImage is an instance so its easier to check for null FallbackImage.
Member
There was a problem hiding this comment.
Nevermind, the AdvancedImage has the same logic, i'm just dumb
TemuWolverine
commented
Mar 1, 2026
Contributor
Author
TemuWolverine
left a comment
There was a problem hiding this comment.
XmlDoc added, simplified bitmap assignment & check for null
(I think I'm using this correctly, I've never used the review function)
| @@ -27,6 +27,14 @@ private static async void OnSourceChanged(ImageBrush imageBrush, AvaloniaPropert | |||
| try { | |||
| if (!string.IsNullOrWhiteSpace(newValue)) { | |||
Contributor
Author
There was a problem hiding this comment.
Isn't that on line 31/32? AdvancedImage is an instance so its easier to check for null FallbackImage.
SKProCH
approved these changes
Mar 2, 2026
This was referenced Mar 3, 2026
This was referenced Mar 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just like in my previous commit, this adds a fallback image property, this time to
ImageBrushLoaderExample usage
Appearance (yes I know its the wrong fallback image but thats between me and my poor asset management 😅)
